<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>

</head>
<body>

	
	<form:form modelAttribute="emp" method="post" action="${pageContext.request.contextPath}/emp">
		<c:if test="${emp.id == null }"><h1 id="title">新增员工</h1></c:if>
		<c:if test="${emp.id != null }">
			<h1 id="title">修改员工</h1>
			<form:hidden path="id"/>
			<input type="hidden" name="_method" value="put">
		</c:if>
		<p>姓名： <form:input path="name"/> </p>
		<p>年龄： <form:input path="age"/></p>
		<p>生日： <form:input path="birthday"/></p>
		<p>部门： <form:input path="deptName"/></p>
		<p>地址： <form:input path="address"/></p>
		
		
		
		<button>提交</button>
		
	</form:form>

</body>
</html>